 import Vue from 'vue'
 import axios from 'axios'
 axios.defaults.baseURL = 'http://localhost:8080'
 Vue.prototype.$http = axios

 // 请求拦截器
 axios.interceptors.request.use(function (config) {
   let token = window.localStorage.getItem("Authorization");
   // 判断token存在再做配置
   if (token) {
     config.headers.Authorization = token;
   }
   return config
 }, function (error) {
   return Promise.reject(error)
 })
